xend: passthrough: check if a device is behind PCIe switch that lacks ACS
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Aug 2009 12:12:16 +0000 (13:12 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Aug 2009 12:12:16 +0000 (13:12 +0100)
commit39b4fc59724a618a6af454d9b85f591bd7b8bf77
tree778d2cd415c489fc8853ab168ca4f70983ce21f5
parentb6cd10140c7d93c8ccf168c13a8455f2e878639c
xend: passthrough: check if a device is behind PCIe switch that lacks ACS

Imagine a PCIe switch, which doesn't support ACS (Access Control
Services), has 2 downstream ports: A and B, according to PCIe spec,
the PCIe switch should directly route the transaction that is from A
and to a device under B -- the Root Complex and IOMMU engine are
bypassed -- this doesn't work at all in the case of hvm guest and can
even incur potential security issue, so we should not allow such kind
of device assignment.

If all the intermediate PCIe swiches between a device and Root Complex
support and enable ACS, we can safely asssign the device to guest.

Cc: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/util/pci.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/pciif.py